#include <iostream>
#include<string>
using namespace std;
class hjx
{
public:
    bool ishjx(char n)
    {
        if((n>='a'&&n<='z')||(n>='1'&&n<='9'))
        {
            return true;
        }
        return false;
    }
   bool huiwen(string s)
   {
       for(auto &e:s)
       {
           if(e>='A'&&e<='Z')
           e=e+32;//全部换成小写
       }
       int left=0;
       int right=s.size()-1;
       while(left<right)
       {
           while(left<right&&!(ishjx(s[left])))
           {
               left++;
           }
           while(left<right&&!(ishjx(s[right])))
           {
               right--;
           }
           if(s[left]!=s[right])
           {
               return false;
           }
           left++;
           right--;
       }
       return true;
   }
};
int main()
{
    string s("hijx,xwjh");
    hjx h1;
    cout<<h1.huiwen(s);
    return 0;
}
